package com.itheima.demo;

import com.itheima.pojo.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class DemoTest {
    public static void main(String[] args) {
        //创建spring IOC容器
        ApplicationContext ac = new ClassPathXmlApplicationContext("spring.xml");
        //获取bean对象
        User user = ac.getBean("user", User.class);
        System.out.println(user);
    }
}
